<template>
	<root-node class="FourZeroOne discenter overhide">
		<div class="discenter overhide"></div>
		<div class="disflex flex-dir-c">
			<div>
				<n-button class="btn" type="primary" round @click="back(0)">
					{{ $t("error.backHome") }}
				</n-button>
			</div>
			<div>
				<n-button class="btn" type="primary" round @click="back(1)">
					{{ $t("error.backLast") }}
				</n-button>
			</div>
		</div>
	</root-node>
</template>

<script lang="ts" setup>
import { useRouter } from "vue-router";
const router = useRouter();

function back(index: number) {
	switch (index) {
		case 0:
			router.push("/dashboard");
			break;
		case 1:
			router.back();
			break;
	}
}
</script>

<style lang="scss" scoped>
.FourZeroOne {
	& > div:nth-child(1) {
		background-image: url("../../assets/images/401.gif");
		background-repeat: no-repeat;
		background-size: 100% 100%;
		user-select: none;
		width: 213px;
		height: 300px;
		margin-right: 20px;
	}
}
.btn {
	width: 144px;
	margin-bottom: 20px;
}
.svgicon {
	transform: scale(20);
}
</style>
